SELECT
<${r"#"}switch (object_id!)>
<#list entityMapper.fieldMapperMap?values as fieldMapper>
<${r"#"}case "${fieldMapper.code}">
"${fieldMapper.columnName}"
<${r"#"}break>
</#list>
<${r"#"}default>
COUNT(*) AS COUNT_
</${r"#"}switch>
FROM ${entityMapper.tableName}
<${r"#"}include "where.ftl">